<!DOCTYPE html>
<html lang="zh">
<head>
    <title>{block name="title"}{$title|default=''}{if !empty($title)} · {/if}{:sysconf('site_name')}{/block}</title>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=0.4">
    <link rel="shortcut icon" href="{:sysconf('site_icon')}">
    <link rel="stylesheet" href="__ROOT__/static/plugs/awesome/fonts.css?at={:date('md')}">
    <link rel="stylesheet" href="__ROOT__/static/plugs/layui/css/layui.css?at={:date('md')}">
    <link rel="stylesheet" href="__ROOT__/static/theme/css/console.css?at={:date('md')}">
    {block name="style"}{/block}
    <script type="text/javascript" src="__ROOT__/static/plugs/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="__ROOT__/static/plugs/echarts/echarts.min.js"></script>
    <script>window.tapiRoot = '{:sysuri("admin/index/index",[],false)}'</script>
    <script src="__ROOT__/static/plugs/jquery/pace.min.js"></script>

    <!--新的样式 default 默认白色主题-->
    <link rel="stylesheet" href="__ROOT__/static/plugs/myself/css/my_theme_light.css?at={:date('md')}"><!--自定义-->

    {if config('myself.app_theme') neq '' }
    <link rel="stylesheet" href="__ROOT__/static/plugs/myself/otherTheme/my_theme_{:config('myself.app_theme')}.css?at={:date('md')}">
    {/if}

    <link rel="stylesheet" href="__ROOT__/static/plugs/myself/css/ripple.css?at={:date('md')}"><!--水波纹-->

</head>
<body class="layui-layout-body">

{block name='body'}
<div class="layui-layout layui-layout-admin layui-layout-left-hide">

    <!-- 顶部菜单 开始 -->
    <div class="layui-header notselect nav-header">
        <a href="{:url('@')}" class="layui-logo layui-elip">
            {:sysconf('app_name')}
            {if sysconf('app_version')}
            <sup class="padding-left-5">{:sysconf('app_version')}</sup>
            {/if}
        </a>

        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item" lay-unselect>
                <a class="text-center" style="display: block !important;" data-target-menu-type >
                    <i class="fa fa-bars"></i>
                </a>
            </li>
        </ul>

        <ul class="layui-nav layui-layout-right">
            <li lay-unselect class="layui-nav-item my-layui-nav-item" title="清理缓存">
                <a data-load="{:url('admin/api.plugs/clear')}"><i class="layui-icon layui-icon-refresh"></i></a>
            </li>
            <li lay-unselect class="layui-nav-item my-layui-nav-item" title="全屏">
                <a><i class="layui-icon layui-icon-screen-full screen-full"></i></a>
            </li>

            {if session('user.username')}
            <li class="layui-nav-item">
                <dl class="layui-nav-child">
                    <dd lay-unselect><a data-modal="{:url('admin/index/info',['id'=>session('user.id')])}"><i
                            class="layui-icon layui-icon-set-fill margin-right-5"></i> 基本资料</a></dd>
                    <dd lay-unselect><a data-modal="{:url('admin/index/pass',['id'=>session('user.id')])}"><i
                            class="layui-icon layui-icon-component margin-right-5"></i> 安全设置</a></dd>
                    {if session('user.username') eq 'admin'}
                    <dd lay-unselect><a data-load="{:url('admin/api.plugs/push')}"><i
                            class="layui-icon layui-icon-template-1 margin-right-5"></i> 缓存加速</a></dd>
                    <dd lay-unselect><a data-load="{:url('admin/api.plugs/clear')}"><i
                            class="layui-icon layui-icon-fonts-clear margin-right-5"></i> 清理缓存</a></dd>
                    {/if}
                    <dd lay-unselect><a data-load="{:url('admin/login/out')}" data-confirm="确定要退出登录吗？"><i
                            class="fa fa-sign-out margin-right-5"></i> 退出登录</a></dd>
                </dl>
                <a class="layui-elip">
                    <img alt="headimg" src="{:session('user.headimg')?:'__ROOT__/static/theme/img/headimg.png'}">
                    <span class="padding-left-5">{:session('user.nickname')?:session('user.username')}</span>
                </a>
            </li>
            {else}
            <li class="layui-nav-item">
                <a data-href="{:sysuri('admin/login/index')}"><i class="layui-icon layui-icon-username"></i> 立即登录</a>
            </li>
            {/if}
        </ul>
    </div>
    <!-- 顶部菜单 结束 -->

    <!-- 左则菜单 开始 -->
    <div class="layui-side layui-side-menu">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree" >
                {foreach $menus as $one}
                    <li data-name="component" class="layui-nav-item">
                            {notempty name='one.sub'}
                                    <a style="font-weight: 600;"  data-ripple="ripple">
                                        <span class='{$one.icon|default="fa fa-map-pin"} padding-right-5'></span>
                                        <cite>{$one.title|default=''}</cite>
                                        <span class="layui-nav-more"></span>
                                    </a>
                                    {foreach $one.sub as $two}
                                        <dl class="layui-nav-child">
                                            <dd class="" style="padding-left: 4px;">
                                                {empty name='two.sub'}
                                                <a data-target-tips="{$two.title}" data-menu-node="m-{$one.id}-{$two.id}" data-open="{$two.url}"  data-ripple="ripple">
                                                    {notempty name='two.icon'}
                                                    <span class='nav-icon {$two.icon|default=""} padding-right-5'></span>
                                                    {/notempty}
                                                    {$two.title|default=''}
                                                </a>
                                                {else}
                                                <a href="javascript:;"  data-ripple="ripple">
                                                    {notempty name='two.icon'}
                                                    <span class='nav-icon {$two.icon|default=""} padding-right-5' ></span>
                                                    {/notempty}
                                                    {$two.title|default=''}<span class="layui-nav-more"></span>
                                                </a>
                                                <dl class="layui-nav-child" style="padding-left: 8px;">
                                                    {foreach $two.sub as $thr}
                                                    <dd>
                                                        <a data-target-tips="{$thr.title}" data-open="{$thr.url}" data-menu-node="m-{$one.id}-{$two.id}-{$thr.id}"  data-ripple="ripple">
                                                            {notempty name='thr.icon'}
                                                            <span class='nav-icon {$thr.icon|default=""} padding-right-5'></span>
                                                            {/notempty}

                                                            {$thr.title|default=''}
                                                        </a>
                                                    </dd>
                                                    {/foreach}
                                                </dl>
                                                {/empty}
                                            </dd>
                                        </dl>
                                    {/foreach}
                                {else}
                                    <a data-menu-node="m-{$one.id}" data-open="{$one.url}" style="font-weight: 600;"  data-ripple="ripple">
                                        <span class='{$one.icon|default="fa fa-map-pin"} padding-right-5'></span>
                                        <cite>{$one.title|default=''}</cite>
                                    </a>
                            {/notempty}
                    </li>
                {/foreach}
            </ul>
        </div>
    </div>
    <!-- 左则菜单 结束 -->

    <!-- 主体内容 开始 -->
    <div class="layui-body layui-bg-gray">{block name='content'}{/block}</div>
    <!-- 主体内容 结束 -->
</div>
{/block}
<script src="__ROOT__/static/plugs/layui/layui.all.js"></script>
<script src="__ROOT__/static/plugs/myself/js/excel.js"></script><!--excel 表格导出-->
<script src="__ROOT__/static/plugs/require/require.js"></script>

<script src="__ROOT__/static/admin.js"></script>
<script src="__ROOT__/static/plugs/myself/js/my_config.js"></script><!--自定义的-->
<script src="__ROOT__/static/plugs/myself/js/ripple.min.js"></script><!--水波纹-->
<script type="text/javascript">
    new Ripple({
        opacity : 0.6,  //水波纹透明度
        speed : 0.7,      //水波纹扩散速度
        bgColor : "#56adff", //水波纹颜色
        cursor : true  //是否显示手型指针
    })
</script>
{block name='script'}{/block}
</body>
</html>
